package com.zhichat.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户会话表
 *
 * @author 团长九哥 https://space.bilibili.com/602197686
 * @email insanetz@163.com
 * @date 2024-12-11 22:23:46
 */
@Data
@Accessors(chain = true)
@TableName("chat_user_session")
public class ChatUserSessionEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 接收者id
     */
    @TableField("receiver_id")
    private Long receiverId;
    /**
     * 接收者id
     */
    @TableField("receiver_type")
    private Integer receiverType;
    /**
     * 会话id
     */
    @TableField("session_id")
    private String sessionId;
    /**
     * 接收者名称
     */
    @TableField("receiver_nickname")
    private String receiverNickname;
    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField("create_time")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @JsonIgnore
    @TableField("update_time")
    private LocalDateTime updateTime;
}
